﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SpLocalizer.Common;
using Microsoft.SharePoint;

namespace SpLocalizer.ContentSourceProviders.SpWeb
{
    /// <summary>
    /// Abstract class for any SharePoint based content
    /// </summary>
    public abstract class AbstractSpContent : AbstractContent
    {
        /// <summary>
        /// Content source for this 
        /// </summary>
        public abstract object ContentSource { get; set; }

        /// <summary>
        /// Bind to the share point resource with Respource Url address and return all descandants (if any)
        /// </summary>
        /// <param name="site"></param>
        /// <param name="ResourceUrl"></param>
        public abstract IEnumerable<AbstractContent> Bind(string ResourceUrl, bool IncludeDescandants);

        /// <summary>
        /// Bind to the share point resource with Respource Guid address (if any)
        /// </summary>
        /// <param name="site"></param>
        /// <param name="WebId"></param>
        public abstract IEnumerable<AbstractContent> Bind(Guid ResourceId, bool IncludeDescandants);

        /// <summary>
        /// Return Descandant content
        /// </summary>
        /*public abstract IEnumerable<AbstractSpContent> Descandants
        {
            get;
        }*/
    }
}
